package ecut.set;

import java.util.ArrayList;
import java.util.Collection;

public class EcutSetTest {
	public static void main(String[] args) {
		EcutSet<String> ecut=new EcutSet<String>();
		System.out.println("add方法测试：");
		System.out.println(ecut.add("韦德"));
		System.out.println(ecut.add(null));
		System.out.println(ecut.add(null));
		System.out.println(ecut.add("韦德"));
		System.out.println(ecut.add("科比"));
		System.out.println(ecut.add("安东尼"));
		System.out.println(ecut);
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
		System.out.println("addAll方法测试：");
		
		Collection<String> c0=new ArrayList<String>();
		c0.add("吉诺比利");
		c0.add("艾佛森");
		System.out.println(ecut.addAll(c0));
		System.out.println(ecut);
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
		System.out.println("size方法测试：");
		System.out.println(ecut.size());
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
		System.out.println("contains方法测试：");
		System.out.println(ecut.contains("韦德"));
		System.out.println(ecut.contains("wade"));
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
		System.out.println("containsAll方法测试：");
		Collection<String> c1=new ArrayList<String>();
		c1.add("韦德");
		c1.add("科比");
		Collection<String> c2=new ArrayList<String>();
		c2.add("韦德");
		c2.add("詹姆斯");
		System.out.println(ecut.containsAll(c1));
		System.out.println(ecut.containsAll(c2));
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
		System.out.println("isEMpty方法测试：");
		System.out.println(ecut.isEmpty());
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
		
		System.out.println("remove方法测试：");
		System.out.println(ecut.remove(null));
		System.out.println(ecut.remove("wade"));
		System.out.println(ecut);
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
		
		System.out.println("removeAll方法测试：");
		Collection<String> c3=new ArrayList<String>();
		c3.add("科比");
		c3.add("詹姆斯");
		System.out.println(ecut.removeAll(c3));
		System.out.println(ecut);
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
		
		System.out.println("retainAll方法测试：");
		Collection<String> c4=new ArrayList<String>();
		c4.add("韦德");
		c4.add("詹姆斯");
		System.out.println(ecut.retainAll(c4));
		System.out.println(ecut);
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
		
		System.out.println(" clear方法测试：");
		ecut.clear();
		System.out.println(ecut);
		System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~");
	}
}
